def MySort(MyList):
    length = len(MyList)
    cut_pos_1 = length // 2
    cut_pos_2 = cut_pos_1 if length % 2 == 0 else cut_pos_1 + 1
    result = sorted(MyList[:cut_pos_1]) + MyList[cut_pos_1:cut_pos_2] + sorted(MyList[cut_pos_2:], reverse=True)
    MyList.clear()
    MyList.extend(result)


def main():
    count = int(input("请输入数的个数："))
    import random
    values = [random.randint(10, 99) for _ in range(count)]
    print(f"原始数据为：{values}")
    MySort(values)
    print(f"排序后数据为：{values}")


if __name__ == "__main__":
    main()
